home *** CD-ROM | disk | FTP | other *** search
/ Aminet 48 / Aminet 48 (2002)(GTI - Schatztruhe)[!][Apr 2002].iso / Aminet / text / edit / vim60rt.lha / Vim / vim60 / syntax / debchangelog.vim < prev    next >
Encoding:
Text File  |  2001-05-01  |  1.9 KB  |  55 lines

  1. " Vim syntax file
  2. " Language:    Debian changelog files
  3. " Maintainer:    Wichert Akkerman <wakkerma@debian.org>
  4. " Last Change:    30 April 2001
  5.  
  6. " Standard syntax initialization
  7. if version < 600
  8.   syntax clear
  9. elseif exists("b:current_syntax")
  10.   finish
  11. endif
  12.  
  13. " Case doesn't matter for us
  14. syn case ignore
  15.  
  16. " Define some common expressions we can use later on
  17. syn match debchangelogName    contained "^[[:alpha:]][[:alnum:].+-]\+ "
  18. syn match debchangelogUrgency    contained "; urgency=\(low\|medium\|high\|critical\)"
  19. syn match debchangelogTarget    contained "\( stable\| frozen\| unstable\| experimental\)\+"
  20. syn match debchangelogVersion    contained "(.\{-})"
  21. syn match debchangelogCloses    contained "closes:\s*\(bug\)\=#\s\=\d\+\(,\s*\(bug\)\=#\s\=\d\+\)*"
  22. syn match debchangelogEmail    contained "[_=[:alnum:].+-]\+@[[:alnum:]./\-]\+"
  23. syn match debchangelogEmail    contained "<.\{-}>"
  24.  
  25. " Define the entries that make up the changelog
  26. syn region debchangelogHeader start="^[^ ]" end="$" contains=debchangelogName,debchangelogUrgency,debchangelogTarget,debchangelogVersion oneline
  27. syn region debchangelogFooter start="^ [^ ]" end="$" contains=debchangelogEmail oneline
  28. syn region debchangelogEntry start="^  " end="$" contains=debchangelogCloses oneline
  29.  
  30. " Associate our matches and regions with pretty colours
  31. if version >= 508 || !exists("did_debchangelog_syn_inits")
  32.   if version < 508
  33.     let did_debchangelog_syn_inits = 1
  34.     command -nargs=+ HiLink hi link <args>
  35.   else
  36.     command -nargs=+ HiLink hi def link <args>
  37.   endif
  38.  
  39.   HiLink debchangelogHeader        Error
  40.   HiLink debchangelogFooter        Identifier
  41.   HiLink debchangelogEntry        Normal
  42.   HiLink debchangelogCloses        Statement
  43.   HiLink debchangelogUrgency        Identifier
  44.   HiLink debchangelogName        Comment
  45.   HiLink debchangelogVersion        Identifier
  46.   HiLink debchangelogTarget        Identifier
  47.   HiLink debchangelogEmail        Special
  48.  
  49.   delcommand HiLink
  50. endif
  51.  
  52. let b:current_syntax = "debchangelog"
  53.  
  54. " vim: ts=8 sw=2
  55.